package model

func (MailServer) TableName() string {
	return "mail_server"
}

type MailServer struct {
	Model
	UserId        string `gorm:"size:40;not null;default:''"` // mail server owner
	ServerName    string `gorm:"not null;default:''"`         // mail server name
	FromEmail     string `gorm:"not null;default:''"`         // from email
	FromName      string `gorm:"not null;default:''"`
	SubjectPrefix string `gorm:"size:100;not null;default:''"` // mail subject prefix
	Host          string `gorm:"size:100;not null;default:''"`
	Port          int    `gorm:"not null;default:0"`
	Username      string `gorm:"not null;default:''"`
	Password      string `gorm:"not null;default:''"`
	Tls           uint8  `gorm:"not null;default:0"`              // default 0, don't use tls
	Protocol      string `gorm:"size:20;not null;default:'smtp'"` // smtp or imap
	Enable        uint8  `gorm:"not null;default:0"`              // default 0: enable 1: disable
}
